package com.yanqu.road.initialize;

import com.yanqu.road.net.operator.ChannelInitializerOperator;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

public class YanQuCHInitializer extends ChannelInitializer<SocketChannel> {

	private ChannelHandler channelHandler;

	@Override
	protected void initChannel(SocketChannel socketChannel) throws Exception {
		ChannelInitializerOperator.initChannel(channelHandler, socketChannel);
	}

	public YanQuCHInitializer(ChannelHandler channelHandler) {
		if (null == channelHandler) {
			throw new NullPointerException("channelHandler null");
		}
		this.channelHandler = channelHandler;
	}

}
